<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.io.*,java.util.*"%>
<%@ page import="java.io.*,java.util.*,java.net.HttpURLConnection,java.net.URL"%>
<%@ page import="org.apache.commons.io.IOUtils,java.nio.charset.Charset"%>
<%@ page import="org.apache.commons.io.FileUtils"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>hhhhh</title>
</head>
<body>
	Hello World!
	<%=getClass().getResource("/").getPath() %>
	<br />
	<%=getClass().getResource("").getPath() %>
	<br />
<%!
public static String getStringFromUrl(String urltxt, String encode) throws Exception {
	URL url = new URL(urltxt);
	HttpURLConnection urlcon = (HttpURLConnection) url.openConnection();
	urlcon.setRequestProperty("User-Agent", "Mozilla");
	urlcon.setConnectTimeout(30000);
	urlcon.setReadTimeout(30000);
	InputStream is2 = urlcon.getInputStream();
	return IOUtils.toString(is2, encode);
}
%>
<%
String t2 = "";
try{
t2 = getStringFromUrl("http://m.biquge.cm/wapbook/837.html", "gbk");
File file = new File("target/html.html");
FileUtils.writeStringToFile(file, t2, Charset.forName("utf-8"));
t2 = FileUtils.readFileToString(file, "utf-8");
}catch(Exception e){}

%>

to  
<br />
<%=t2%>
</body>
</html>